package com.example.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;

@Configuration
@EnableMongoRepositories(basePackages = {"com.example.service.activity"}, mongoTemplateRef = "activityMongoTemplate")
@ConfigurationProperties(prefix = "activity.mongodb")
public class ActivityMongoConfigure extends AbstractMongoConfigure{


		@Override
	    @Bean(name = "activityMongoTemplate")
	    public MongoTemplate getMongoTemplate() throws Exception {
	        return new MongoTemplate(mongoDbFactory());
	    }
}
